var mongoose = require("mongoose");
var db = require('./db');
var commentModel = db.model("comment",new mongoose.Schema({
    username:{
        type: String,
        required:true,
    },
    comment:{
        type: String,
        required: true,
    },
    date:{
        type: Date,
        default: Date.now()
    },
    like:{
        type:Number,
        default: 0,
    },
    deleted:{
        type:Boolean,
        default: false
    },
    people:{
        type: Array,
        default:[]
    }

}), "comment");

//数据库里面的一个表
module.exports =  commentModel;